home *** CD-ROM | disk | FTP | other *** search
/ Mac Magazin/MacEasy 19 / Mac Magazin and MacEasy Magazine CD - Issue 19.iso / Wissenschaft & Technik / Open Prolog / Documents / Open Prolog Info < prev    next >
Text File  |  1995-12-19  |  26KB  |  563 lines

  1. ◊ Welcome to 'Open Prolog'.
  2.  
  3. The version of Open Prolog to which this document refers is given in the Get Info… information for this document.
  4.  
  5. Open Prolog is an implementation of Edinburgh-syntax Prolog.
  6. The Edinburgh syntax is the de-facto standard Prolog syntax, and is the basis for the forthcoming ISO Prolog.
  7.  
  8. If you are an absolute beginner in Open Prolog, it's probably better for you to go through the tutorial session in 'Getting Started'. Then, by all means, read this document carefully, especially the section on workarounds at the end.
  9.  
  10. This software is continually under development, so it has bugs.
  11. Save your work often.
  12.  
  13. Changes from previous versions are listed in the file 'Revision History'.
  14.  
  15.  
  16. ◊ Introduction
  17.  
  18. Open Prolog is an implementation of Edinburgh-syntax Prolog.
  19.  
  20. For information on Prolog itself, refer to one of the standard textbooks,
  21. for instance 'Programming in Prolog' by Clocksin & Mellish,
  22. 'Introduction to Logic Programming' by Christopher Hogger, or the
  23. excellent 'Artificial Intelligence through Prolog' by Neil C. Rowe.
  24.  
  25. Open Prolog supports most of the features of DEC Prolog or C-Prolog,
  26. including Definite Clause Grammars.
  27. The 'logical' assert and retract semantics of Lindholm & O'Keefe are
  28. implemented.
  29. Open Prolog supports disjunctive calls, negation, if-then and if-then-else according (we believe) to the draft ISO Prolog standards. In particular, the handling of cuts complies with that specified in the Draft.
  30. It also supports program-originated catch-and-throw exception handling conforming to the ISO Draft. 
  31.  
  32. Real-number arithmetic and internal database predicates are not supported.
  33.  
  34. Last Call Optimisation (often called Tail Recursion Optimisation) is done,
  35. and indexing on the first argument of clause heads is performed,
  36. mainly to detect determinacy so as to improve memory utilisation.
  37.  
  38. Open Prolog is called 'Open' because 'external' predicates can be dropped into
  39. it via a Hypercard-like External Predicate Interface.
  40.  
  41. Open Prolog is not copy protected. 
  42.  
  43.  
  44. ◊ System & Memory Requirements
  45.  
  46. Open Prolog runs in machines having System 6 or later system software.
  47. It is System 7 compatible, and supports 'required' AppleEvents.
  48. Open Prolog is 32-bit clean, is compatible with RAM Doubler and Speed Doubler.
  49.  
  50. Open Prolog will run in a memory allocation of
  51. 700K bytes or a bit less. 1024K bytes is recommended as a minimum. If you have room,
  52. set it's allocation to 2048K or even 4096K. Do not allocate more memory than your machine really has - for example, if your machine has 8M or RAM, performance will be degraded (especially during garbage collection) if you allocate more than 8M in a machine with virtual memory or RAM Doubler enabled.
  53.  
  54. Most of the programs you might use or write while you are learning Prolog won't require more than 1024K (1M). If they run out of memory, it's usually due to a programming error. Some large programs do, however, require lots of memory.
  55. Open Prolog has run well in a 16 MB partition (on a Quadra with 20MB RAM, running in 32-bit mode). For your information, it also runs, slowly, in a 48MB partition in the same machine with 80MB virtual memory.
  56.  
  57. At the other end of the memory scale, Open Prolog will run comfortably under System 6 on a 1MB machine with Multifinder off. If you can't start up in a 1MB machine with Multifinder off, check that you haven't got too big a cache set (64K should be adequate), and/or too many Startup (INIT) Documents, Extensions or Control Panels.
  58.  
  59. All memory management and garbage collection is automatic.
  60. No divination of stack size or other nonsense is necessary (or possible) - it's done automatically.
  61. The name table is not garbage-collected, so it's possible to overflow it.
  62.  
  63. Open Prolog is capable of running in the Multifinder/System 7 background
  64. on long computations.
  65.  
  66. For your information, the development environment is currently a Performa 5300
  67. with System 7.5.1 and Speed Doubler.
  68.  
  69.  
  70. ◊ Speed
  71.  
  72. Here are some speeds for the naive reverse benchmark on different Macintoshes:
  73.  
  74. PowerMac 9500 (120MHz), System 7.5.2       190 KLips
  75. Performa 5300, System 7.5.1, Speed Doubler 130 KLips
  76. Performa LC630, System 7.5.1                60 KLips
  77. Performa 5300, System 7.5.1                 25 KLips
  78. PowerBook 140, System 7.5.1                  9 KLips
  79. Macintosh Plus, System 7.1                   1.9 KLips
  80.  
  81. It has not been 'tweaked' to perform particularly well on benchmarks.
  82.  
  83. ◊ About Open Prolog…
  84.  
  85. The 'About Open Prolog…' box contains a stacks indicator which
  86. shows memory space broken into
  87. Name (atom & functor), Code, Global, Local & Trail spaces.
  88.  
  89. It's possible to watch the stacks grow and contract as the program runs,
  90. but keeping the stacks indicator up-to-date slows execution quite a bit!
  91. To avoid the speed penalty, it's possible to open and close the box while
  92. the interpreter is running.
  93. Alternatively, hiding the stacks indicator fully is just as effective.
  94.  
  95. On the 'About Open Prolog…' box, you can see how much RAM has been
  96. allocated to Open Prolog. This will be up to a maximum of what was asked
  97. for, but may be much less if there isn't enough memory in the machine.
  98.  
  99.  
  100. ◊ Installing Open Prolog
  101.  
  102. Open Prolog can be run from floppy, hard disk, or file server.
  103. It may be in a locked or read-only volume. It requires no special installation. 
  104.  
  105. (Previous versions needed the file Syserrs.Err in the System Folder to provide
  106. error information, but this requirement has been removed. Remove Syserrs.Err
  107. if you no longer need it for other applications.)
  108.  
  109. When Open Prolog starts up, it looks for a folder called Open Prolog Additions. This folder has to be in the Extensions folder of your System Folder (or just in the System Folder if you're using System 6). If the folder doesn't exist, then Open Prolog will create it. You can place extra stuff for Open Prolog to use in the Open Prolog Additions folder. For example, in this release, there is a folder called 'for the Open Prolog Additions ƒ' which contains two extra predicates. If you want to use them, drag them into the Open Prolog Additions folder and restart Open Prolog. One predicate is called environment/1, giving information about the Prolog environment, and the other is called debugStartAction/0, called just when a trace begins.
  110.  
  111. ◊ Using Open Prolog
  112.  
  113. Open Prolog is a text-oriented Prolog. If you have used DEC Prolog or
  114. C-Prolog, then the style of use of Open Prolog is quite similar.
  115.  
  116. To try to take advantage of Macintosh's great user interface, Open Prolog's user interface is window-oriented rather than line-oriented. To accomplish this effectively, there are a few differences between Open Prolog's interface and, say, C-Prolog's. In particular, the (line oriented) prompts of C-Prolog are moved to the status bar, and you make use of the ENTER key to enter commands and information.
  117.  
  118. If you haven't done so already, you should go through the beginners tutorial in 'Getting Started'. 
  119.  
  120. ◊ Startup
  121.  
  122. In the standard Macintosh way, you can start Open Prolog
  123. either by opening some of its documents or by opening the application itself.
  124.  
  125. ° Home Folder
  126. A 'Home Folder' is chosen automatically as follows:
  127. If you start Open Prolog by opening some of its documents, then the
  128. folder the documents are in becomes the Home Folder.
  129. If you start Open Prolog by opening it directly, then the folder it's in
  130. becomes the Home Folder.
  131. See the section on File Naming for the significance of the
  132. Home Folder.
  133.  
  134. ° Startup Folder
  135. The Startup Folder is the folder Open Prolog is in when it is launched.
  136.  
  137. ° Additions Folder
  138. The Additions Folder is the folder called 'Open Prolog Additions' that is in the Extensions folder of your System Folder (or in the System Folder if you're using System 6).
  139.  
  140. ° Startup Actions
  141. Before opening any files that you may have selected on the desktop,
  142. Open Prolog will open a Worksheet in the home folder, always called
  143. 'Open Prolog Worksheet'.
  144.  
  145. Open Prolog does a few other things at startup:
  146. It looks in the startup folder, and, if necessary, the additions folder, for a file called 'Open Prolog Options', and if it exists, it is consulted.
  147.  
  148. It looks in the home folder for a file called 'Open Prolog Startup' and if
  149. it exists, it is consulted.
  150.  
  151. These files can be used to do routine things at startup, if desired.
  152. Open Prolog Options should contain generally useful stuff, whereas
  153. Open Prolog Startup, being specific to a folder, can contain more specialised
  154. startup stuff.
  155.  
  156. For example, in this distribution of Open Prolog, a clause in
  157. the Open Prolog Startup file displays an alert message in a box notifying you about the 'Getting Started' document.
  158. So, if this folder happens to be the Home Folder, then the Open Prolog Startup
  159. file will be consulted, and you'll get the alert message.
  160.  
  161. Once the startup phase is finished, you are free to edit these files in the
  162. normal way - there's nothing special about them.
  163.  
  164. Note that while Open Prolog Options is being consulted during startup, the default folder for files is the startup or additions folder rather than the home folder.
  165. This facilitates automatic startup with multiple file consultation. 
  166.  
  167.  
  168. ◊ Working with Open Prolog
  169.  
  170. It helps to visualise the system as having two distinct parts -
  171. the text editor and the Prolog interpreter.
  172.  
  173. ◊ The Text Editor part of Open Prolog
  174.  
  175. Your interaction with Open Prolog is via the text editor. With it, you can do
  176. text editing things on the Worksheet, and on up to seven other files. You can also issue commands and send information into the Prolog interpreter - see later.
  177.  
  178. The text-editing facilities offered are standard text editor commands and functions.
  179.  
  180. Worth mentioning is 'Auto-indent' which, if enabled, works by copying all the spaces & tabs from the start of the previous line down to the start of this line.
  181. Holding down the Option key when typing Return will do the opposite of whatever is selected for auto-indent.
  182.  
  183. Also worth mentioning is the 'Search All Windows' in the Find and Replace menus:
  184. all windows will be searched, in front-to-back order, until a match is found. The window in which the match is found becomes the front window.
  185. Holding down the Shift key when selecting find or replace will reverse the search direction.
  186.  
  187. An open diamond - ◊ - appears opposite the name of the current front window
  188. in the Window menu. Underlining indicates that the window needs to be
  189. saved (either it's been changed, or it was never saved before).
  190.  
  191. The 'Display Selection' menu will scroll the caret or the selected text into
  192. view.
  193.  
  194. It's possible that Open Prolog won't allow you to open a window because it hasn't
  195. enough memory. To get around this, enter the built-in predicate 'garbage_collect'.
  196. This should free up some space for more windows.
  197.  
  198. ° Window Characteristics
  199. When windows are opened, they are opened in the same location (assuming
  200. it's still visible), and with the same size as when they were last closed.
  201.  
  202. Likewise, font, font size and the position of the flashing caret or selection
  203. point are remembered from when the window was last used.
  204.  
  205. A window's maximum size if fixed according to the size of the
  206. printable page in the currently selected printer.
  207.  
  208.  
  209. ° Locked Files
  210. If a file is locked, or its volume is locked or read only, you can use the
  211. window as normal, but you won't be allowed to save changes to that file.
  212. Locked files have a padlock icon in their window's status bar.
  213.  
  214. ◊ The Interpreter part of Open Prolog
  215.  
  216. Most of the transactions that occur between you and the Open Prolog interpreter will be through a window, using the Text Editor.
  217.  
  218. Generally, you issue commands by typing them into a window and then
  219. notifying the interpreter about them using the ENTER key.
  220. Open Prolog writes replies into the same window.
  221.  
  222. You can use any window for sending commands and for getting replies,
  223. but the Worksheet will be chosen by default or if any errors occur
  224. when using another window.
  225.  
  226. The Worksheet can't be closed.
  227.  
  228. ◊ The ENTER Key
  229. While you are editing text, the Prolog interpreter is disconnected from
  230. what you are doing - it won't be 'listening'. To get its attention, you need
  231. to notify it in some way that what you're doing is not just text editing.
  232. That is the function of the ENTER key: all input from the text editor to the
  233. Prolog interpreter is denoted by selecting the text and typing the ENTER key.
  234. (This is similar to the arrangement in Apple's excellent MPW).
  235.  
  236. For example, below is the text of a command to consult the file 'benchmarks'.
  237. To input it to the interpreter,  select it (include the full stop) and
  238. type the ENTER key:
  239.  
  240. [benchmarks].
  241.  
  242. In practice, you don't always have to select the whole thing - if the text
  243. occupies only one line, position the caret anywhere along the line
  244. and press the ENTER key.
  245. The whole line will then be taken as the text. This is called
  246. 'single line selection'.
  247.  
  248. Remember also that you need to use the ENTER key to denote all input to the
  249. interpreter, not just command input. For example, if your program wants to
  250. read a term from the user, you must type or find the text, select it all,
  251. and press the ENTER key to tell the interpreter to take it as input.
  252.  
  253. For example, try evaluating the following query by single-line-selecting it.
  254. You'll need to provide a further input in response; again, you
  255. can use single line selection. Also, remember the full stop after
  256. the term:
  257.  
  258. write('Please enter a Prolog term: '),read(Term),write('It''s: '),write(Term).
  259.  
  260. As is normal on DEC Prolog, where variable bindings are given as part
  261. of the result of a query, the system waits for confirmation - type the
  262. ENTER key - or a request for a retry - type a semicolon and  the ENTER key.
  263.  
  264. ◊ Prompts
  265. The standard ?- prompt generally appears on the  'status bar'
  266. at the top of the front window.
  267. If you wish, you can enter a query preceded by a ?-  - it won't make any
  268. difference. If you precede your query by a :- then it will be performed
  269. without returning the variable bindings.
  270.  
  271. Examples:
  272. :- write(H),nl.
  273. ?- write(G).
  274.  
  275. ◊ Comment on ENTER & Prompts
  276. Using the ENTER key to denote input to the interpreter has many advantages,
  277. although it's probably a bit annoying to get used to.
  278. The principal advantage is that, since RETURN does not signify a command or anything special, you can do standard text editing freely and you can use any part of the Worksheet as a source of input.
  279. In other words, you can re-use text on the Worksheet over and over.
  280. (Some people have complained that there isn't an ENTER key of their
  281. machines. In fact, there is one on every machine. Sometimes it has a symbol
  282. like an arrowhead pointing upwards to meet a horizontal line.
  283. On compact keyboards it is usually the strange key to the right of the
  284. space bar.)
  285.  
  286. ◊ Verbose and Terse Answers
  287. Most Prologs answer a query with a 'yes' (after any variable bindings) or a 'no' depending on whether the query can be proved or not.
  288. Open Prolog defaults to this behaviour also - it gives a 'verbose' answer.
  289. If you wish, you can suppress the output of 'yes' and 'no'
  290. by changing the answering mode from verbose to terse. The built-in predicate
  291. to use is 'system$answer$mode'(CurrentAnswerMode,NewAnswerMode).
  292. Allowed arguments are 'terse' or 'verbose'.
  293. The following example determines the current answering mode without
  294. changing it:
  295.  
  296. 'system$answer$mode'(State,State).
  297.  
  298. ◊ Syntax Errors
  299. When Open Prolog tries to read a term - either as a result of your program,
  300. or of built-in predicates like consult - if it detects any errors, it will try to
  301. notify you in a useful way. An error message is written to the output window.
  302. The part of the error message that begins:
  303. :- 'Show Syntax Error'(… 
  304. has the form of a Prolog command, and can be used to call the
  305. 'Show Syntax Error' built-in predicate,
  306. which will try to open the file and show you where the error was.
  307. You use it by single-line-selecting it.
  308. Try it by consulting the file 'buggy syntax' which has a 
  309. deliberate error:
  310.  
  311. ['buggy syntax'].
  312.  
  313. If the file is too big to open as a window (greater than 32767 bytes), the call will fail.
  314.  
  315. ◊ Activity During Evaluation
  316. During a long evaluation, it's possible to use the
  317. text editor in windows other than the current output window (the current
  318. output window is usually the Worksheet). The system will share
  319. the processor between the interpreter and the text editor.
  320. Generally, you won't notice the sharing being done.
  321. Occasionally, however, the interpreter will keep the processor
  322. for a few seconds to do garbage collection, or I/O.
  323. During that time the text editor will 'freeze' and won't respond to
  324. the keyboard or other user input.
  325. This is normal and is no cause for concern.
  326.  
  327. Please be careful to save your work frequently in this mode,
  328. because if the evaluation causes Open Prolog to crash, 
  329. your work may be lost. 
  330.  
  331. ◊ Stopping an Evaluation
  332. The standard 'Command-.' will halt a Prolog evaluation.
  333.  
  334. ◊ Background Operation
  335. Open Prolog is Multifinder friendly and will run in the Multifinder 
  336. background. This may be useful for long evaluations. Running under System 7,
  337. it can be hidden and still be running.
  338.  
  339.  
  340. ◊ Operation on battery powered Macintoshes.
  341.  
  342. Open Prolog works fine on all battery powered Macintoshes.
  343.  
  344. One complication regarding battery powered Macs is that
  345. during periods of longer than about 15 seconds without any
  346. user interaction or cursor animation, the machine may go into 'rest' mode.
  347. In this mode, battery power is conserved by running about 15 times slower
  348. than normal.
  349.  
  350. Open Prolog spins a cursor during long evaluations to prevent resting.
  351. However, if you are text-editing during an evaluation, the cursor will be
  352. the I-beam, and it won't be animated; if you stop typing or moving the mouse
  353. for more than about 15 seconds, then the machine will rest.
  354.  
  355. ◊ Built-In Predicates
  356. To get a list of all predicates - normal, built-in and external,
  357. there follows a sequence of commands to perform.
  358. Select them all and hit the <ENTER> key:
  359.  
  360. 'system$predicate'(X,Y,Z),functor(Y,X,A),
  361. writeq(X),write('/'),write(A),write(.),write('   % '),write(Z),nl,fail.
  362.  
  363. Note: with a few exceptions, you should stay away from
  364. anything with a $ in it, or anything with the word 'system' in it - you
  365. may end up crashing the program.
  366.  
  367. The file 'Open Prolog Extras' has more information about some of
  368. the non-standard predicates.
  369.  
  370. ◊ Redefining Built-In Predicates
  371. Open Prolog complains if you try to redefine any built-ins or externals.
  372.  
  373. ◊ Arithmetic
  374. Arithmetic is standard 32-bit integer arithmetic. The following
  375. predefined functions are provided:
  376. unary minus: - 
  377. subtraction: - 
  378. addition: +
  379. multiplication: *
  380. integer division: / (also //)
  381. mod (remainder): mod
  382. absolute value: abs
  383. bitwise and: /\
  384. bitwise or: \/
  385. bitwise not: ~ (also \)
  386. bitwise leftshift: <<
  387. bitwise rightshift: >>
  388. maximum integer:  maxint
  389. minimum integer: minint
  390. time:  cputime
  391. The function 'cputime' gives the time in milliseconds since system startup
  392. with a short-term granularity of approximately 16 mS (one system 'tick').
  393. Use the built-in procedure 'system$seconds'(Seconds) for more
  394. accurate timing of long intervals.
  395.  
  396. ◊ Operators
  397. The standard DEC Prolog operator definitions are made at startup.
  398. You can get a list of operator definitions by evaluating the following query.
  399.  
  400. bagof(N,current_op(P,K,N),L),writeq((current_op(P,K,L))),write('.'),nl,fail.
  401.  
  402. ◊ Extended Character Set
  403. The full laser-printer character set (e.g. Times), which has more
  404. characters than the original standard character sets like Chicago,
  405. is assumed here.
  406.  
  407. Accented characters are treated as alphabetic, so atoms containing
  408. accented characters don't need to be put in quotes.
  409.  
  410. Thus the following is legal:
  411.  
  412. Xävier = nóirín+jürgen+École+grève+daõ+çedilla+forêt.
  413.  
  414. ◊ Sorting
  415. Sorting is performed by the Mac's International Utilities, which
  416. should handle accented characters correctly.
  417.  
  418. Names are sorted lexically. Primary ordering of names ignores case and accent
  419. information; case and accent data is used to order names that are
  420. identical under primary ordering.
  421.  
  422. ◊ Files
  423. The file-handling arrangements are essentially unchanged from DEC Prolog,
  424. except where obviously necessary, but please see the Release Notes for 1.0.2 for a discussion of new file-handling predicates.
  425.  
  426. ◊ File Naming
  427. File naming follows standard Macintosh practice. To specify a file in the
  428. home folder, just give its name (as 'benchmarks' above).
  429.  
  430. If it's in another folder, you can give its full pathname. For example, to 
  431. consult a file called 'Utilities' on a disk or volume called 'Open Prolog Disk'
  432. in a folder called 'Samples' you could use:
  433.  
  434. ['Open Prolog Disk:Samples:Utilities'].
  435.  
  436. Alternatively, you can specify a file by its partial pathname (i.e. the
  437. extra information needed to 'get from' the Home Folder to there).
  438. For instance, on this distribution you can use the following to consult
  439. the file 'Tak' in the folder 'Samples' which is in the Home Folder:
  440.  
  441. [':Samples:Tak'].
  442.  
  443. You can also specify a folder or file in a special way. Please refer to the Release Notes for information on this.
  444.  
  445. ◊ End of File & End of Line
  446. -    End of line & end of file treatment is the same as in DEC Prolog.
  447. -    When reading from a file, the last term is always 'end_of_file'.
  448. -    When get-ing or get0-ing from a file, the last character is code 26.
  449. .    Carriage Returns (ASCII code 13), generally signifying end-of-line in a file,
  450. are filtered out of the get or get0 stream and replaced by code 31.
  451.  
  452. Input from a window never results in an end of file condition.
  453.  
  454. ◊ nl
  455. -    nl outputs a Carriage Return (ASCII code 13).
  456.  
  457. ◊ get & get0
  458. -    get & get0 always return the next character, irrespective of whether it is
  459. 'printable' or not.
  460.  
  461. ◊ Debugging
  462. The main Program Debugging facility is the trace/1 predicate.
  463. You can trace the execution of a predicate by calling it via trace:
  464.  
  465. %assuming you've already consulted 'tak' above…
  466.  
  467. trace(tak(12,8,4,N)).
  468.  
  469. The commands available are:
  470. <ENTER> - trace
  471. s<ENTER> - step over
  472. a<ENTER> - abort
  473. f<ENTER> - fail
  474. l<ENTER> - leap. Continue tracing silently until a spypoint is encountered.
  475. @<ENTER> - break for one command
  476.  
  477. You can place spypoints (a.k.a. breakpoints) on named predicates. Spypoints are only effective when Open Prolog is in the trace mode.
  478.  
  479. e.g.
  480.  
  481. spy(member).
  482.  
  483. will put a spypoint on all occurences of a member predicate.
  484.  
  485. nospy(append).
  486.  
  487. will remove spypoints from all occurences of append.
  488.  
  489. spying will list all spypoints in place.
  490.  
  491. The unknown/2 predicate specifies what happens when a call is made
  492. to an unknown predicate. (Allowable values are fail or trace.)
  493.  
  494. For example, select:
  495.  
  496. unknown(X,trace).
  497.  
  498. This will set Open Prolog to enter the trace mode when an unknown call is made.
  499.  
  500. Try it now by selecting:
  501.  
  502. huh(What).
  503.  
  504. A debugger giving access to the source code is under development.
  505.  
  506.  
  507.  
  508. ◊ External Predicates
  509. External predicates are extra predicates written separately from Open Prolog, and 
  510. then 'dropped' into Open Prolog using something like ResEdit. At present, an
  511. MPW Pascal interface is defined. It's possible to use SADE to debug external predicates that have been written using MPW.
  512. A THINK C interface is being developed by a number of users - for now, please contact me for details at brady@cs.tcd.ie.
  513.  
  514. To get a list of external predicates available in this version of Open Prolog, execute the following command:
  515.  
  516. 'system$predicate'(X,Y,external),functor(Y,X,A),writeq(X),write('/'),write(A),write(.),nl,fail.
  517.  
  518. More information on building External Predicates, including a few exampes, is available in the folder 'External Predicates…'. 
  519.  
  520.  
  521. ◊ System Error Messages:
  522. There are three kinds of error messages:
  523. A. A simple information box with 'OK' as the only option.
  524. B. A 'Diagnostic' or 'Breakpointer' information box.
  525. This is intended for giving debugging information, and if it turns up
  526. in normal operation it means that a special condition has occured. 
  527. C. Whenever Open Prolog detects a system error, it will warn you about it.
  528. You are generally given some information about the source and kind of the
  529. error. Naturally, it isn't always possible to predict what will happen
  530. if you continue operating the system.
  531.  
  532. Summarising: When you get an error message,
  533. if you are given a choice, it's best (initially) to exit.
  534. You normally get to save your files and windows, although sometimes
  535. the nature of the error causes more errors to be made as the files &
  536. windows are being saved. It that happens, you lose your fi…
  537. Experience will tell what's best to do in a situation.
  538. (I sure hope you don't get a lot of that experience…)
  539.  
  540. I'd appreciate you mailing me with the circumstances and nature of
  541. B & C type messages, and of undesirable effects of A type messages.
  542.  
  543. ◊ Problems with Open Prolog
  544. Here are the known significant difficulties with Open Prolog at the moment.
  545. There are simple workarounds for them all.
  546.  
  547. 1. The absolute maximum size of any file that can be seen in an Open Prolog
  548. window is limited to 32767 characters.
  549. This limit only applies to files that you want to open as windows.
  550. So, for example, if your program produces large output files, that's OK as
  551. long as you don't want to open them as windows from Open Prolog.
  552. Workarounds:
  553.  Break your files into smaller files.
  554.  Trim the Worksheet periodically so that is doesn't get too big.
  555.  To view and process larger text files, you'll need to use a text processor
  556. (MPW highly recommended) or word processor in text mode.
  557. Open Prolog tries to warn you about window contents exceeding 32767
  558. characters. Please don't rely on it too much - when it warns you,
  559. it's often too late to do anything about it.
  560.  
  561. 2. Tab characters are not properly represented or printed - instead a tab
  562. always occupies exactly one space. If you intend using your files with
  563. another text/word processor, then you should put them in…